<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //  随机数：Math.random()
        var str="#"
        for(var i=1;i<=6;i++){
            var num=parseInt(Math.random()*16).toString(16);

            str+=num
        }
        console.log(str);
    </script>
</body>
</html>